<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2Settings.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_4ab6b4cc6a7edbff49100e9123df213f.html">Common</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b2Settings.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b2_settings_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">* Copyright (c) 2013 Google, Inc.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">* This software is provided &#39;as-is&#39;, without any express or implied</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">* warranty.  In no event will the authors be held liable for any damages</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">* arising from the use of this software.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">* Permission is granted to anyone to use this software for any purpose,</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">* including commercial applications, and to alter it and redistribute it</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">* freely, subject to the following restrictions:</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">* 1. The origin of this software must not be misrepresented; you must not</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">* claim that you wrote the original software. If you use this software</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">* in a product, an acknowledgment in the product documentation would be</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">* appreciated but is not required.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">* 2. Altered source versions must be plainly marked as such, and must not be</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">* misrepresented as being the original software.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">* 3. This notice may not be removed or altered from any source distribution.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#ifndef B2_SETTINGS_H</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define B2_SETTINGS_H</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;float.h&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#define B2_NOT_USED(x) ((void)(x))</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#if DEBUG &amp;&amp; !defined(NDEBUG)</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2Assert(A) assert(A)</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define B2_ASSERT_ENABLED 1</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#else</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2Assert(A)</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define B2_ASSERT_ENABLED 0</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">// Statement which is compiled out when DEBUG isn&#39;t defined.</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#if DEBUG</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define B2_DEBUG_STATEMENT(A) A</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#else</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define B2_DEBUG_STATEMENT(A)</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif  // DEBUG</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">// Calculate the size of a static array.</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#define B2_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> int8;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> int16;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> int32;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> uint8;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> uint16;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uint32;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">float</span> float32;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">double</span> float64;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor"></span><span class="keyword">typedef</span> __int64   int64;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> __int64   uint64;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#else // !WIN32</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> int64;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> uint64;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#define b2_maxFloat     FLT_MAX</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_epsilon      FLT_EPSILON</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_pi           3.14159265359f</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#if !defined(b2Inline)</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#if defined(__GNUC__)</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2Inline __attribute__((always_inline))</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#else</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2Inline inline</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif // defined(__GNUC__)</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif // !defined(b2Inline)</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment">// We expand the API so that other languages (e.g. Java) can call into</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment">// our C++ more easily. Only set if when the flag is not externally defined.</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="preprocessor">#if !defined(LIQUIDFUN_EXTERNAL_LANGUAGE_API)</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#if SWIG || LIQUIDFUN_UNIT_TESTS</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LIQUIDFUN_EXTERNAL_LANGUAGE_API 1</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#else</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LIQUIDFUN_EXTERNAL_LANGUAGE_API 0</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="comment">// Collision</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#aa5f44cc9edf711433dea2b2ec94f3c42">   93</a></span>&#160;<span class="preprocessor">#define b2_maxManifoldPoints    2</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a09d71ee1993bee28b5b2e6d893b41884">   97</a></span>&#160;<span class="preprocessor">#define b2_maxPolygonVertices   8</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#adb86e231496fdd6ac7795ce58d40c870">  102</a></span>&#160;<span class="preprocessor">#define b2_aabbExtension        0.1f</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a7d1bd1594f20601d4079bccbd0a6a03c">  107</a></span>&#160;<span class="preprocessor">#define b2_aabbMultiplier       2.0f</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a57268ade379c5c3373d0ff558b0350cf">  111</a></span>&#160;<span class="preprocessor">#define b2_linearSlop           0.005f</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a67810fb101bb7a7e0b3afc14845383ee">  115</a></span>&#160;<span class="preprocessor">#define b2_angularSlop          (2.0f / 180.0f * b2_pi)</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#afc0f934dabffb1e83e081249133ad860">  120</a></span>&#160;<span class="preprocessor">#define b2_polygonRadius        (2.0f * b2_linearSlop)</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#ac1fd56e39ab8499f344b6398b7332e55">  123</a></span>&#160;<span class="preprocessor">#define b2_maxSubSteps          8</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="comment">// Dynamics</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#aad3a54bcae5f7ec0235963403c2fccc9">  129</a></span>&#160;<span class="preprocessor">#define b2_maxTOIContacts           32</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a690b448aa2dba2a1393781f8c059c22a">  133</a></span>&#160;<span class="preprocessor">#define b2_velocityThreshold        1.0f</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a23ab70e4809f5ee23abcd52018d5eb88">  137</a></span>&#160;<span class="preprocessor">#define b2_maxLinearCorrection      0.2f</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a823e4f9a6fa4b9de3c97da696571400a">  141</a></span>&#160;<span class="preprocessor">#define b2_maxAngularCorrection     (8.0f / 180.0f * b2_pi)</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#af2bad257bfbafed3665df3e243ba2b52">  145</a></span>&#160;<span class="preprocessor">#define b2_maxTranslation           2.0f</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_maxTranslationSquared    (b2_maxTranslation * b2_maxTranslation)</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a5808c5f1e946205d8f7458101ccc698e">  150</a></span>&#160;<span class="preprocessor">#define b2_maxRotation              (0.5f * b2_pi)</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_maxRotationSquared       (b2_maxRotation * b2_maxRotation)</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a88e32539e0f9e69e3832e1321eba3caa">  156</a></span>&#160;<span class="preprocessor">#define b2_baumgarte                0.2f</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_toiBaugarte              0.75f</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="comment">// Particle</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="preprocessor">#if !defined(B2_USE_16_BIT_PARTICLE_INDICES) &amp;&amp; defined(LIQUIDFUN_SIMD_NEON)</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define B2_USE_16_BIT_PARTICLE_INDICES</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#adc056d2ee984ceb388fcd38e257e71b6">  168</a></span>&#160;<span class="preprocessor">#define b2_invalidParticleIndex     (-1)</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="preprocessor">#ifdef B2_USE_16_BIT_PARTICLE_INDICES</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_maxParticleIndex         0x7FFF</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#else</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_maxParticleIndex         0x7FFFFFFF</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a67092aba35939215cea0213618591031">  177</a></span>&#160;<span class="preprocessor">#define b2_particleStride           0.75f</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a8ca77d20adfeafed68bb71041a68a41f">  180</a></span>&#160;<span class="preprocessor">#define b2_minParticleWeight            1.0f</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a06b74a32a69d07543c724a728afbe906">  183</a></span>&#160;<span class="preprocessor">#define b2_maxParticlePressure      0.25f</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#ae727d446572abad0a53820309404fa47">  186</a></span>&#160;<span class="preprocessor">#define b2_maxParticleForce     0.5f</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a31415738c2d85a958b43b3086141fc85">  190</a></span>&#160;<span class="preprocessor">#define b2_maxTriadDistance         2</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define b2_maxTriadDistanceSquared      (b2_maxTriadDistance * b2_maxTriadDistance)</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a70a95f8fdc7c5eb5538a06640486c150">  194</a></span>&#160;<span class="preprocessor">#define b2_minParticleSystemBufferCapacity  256</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a45311f1895abdb7ea82a04829384d9c7">  197</a></span>&#160;<span class="preprocessor">#define b2_barrierCollisionTime 2.5f</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="comment">// Sleep</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#ab021adb740e4a5e1f5f7d9913ed94781">  202</a></span>&#160;<span class="preprocessor">#define b2_timeToSleep              0.5f</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a6d882c48142a8c73011b576e20dc6dd8">  205</a></span>&#160;<span class="preprocessor">#define b2_linearSleepTolerance     0.01f</span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a571f3e7c864aca14141b163205600eef">  208</a></span>&#160;<span class="preprocessor">#define b2_angularSleepTolerance    (2.0f / 180.0f * b2_pi)</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="comment">// Memory Allocation</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;<span class="keywordtype">void</span>* <a class="code" href="b2_settings_8h.html#a2dca9b286e9b9d6d022055fd61534bd7">b2Alloc</a>(int32 size);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="keywordtype">void</span> <a class="code" href="b2_settings_8h.html#a50f4abf5edeabd0300946edbd542e24d">b2Free</a>(<span class="keywordtype">void</span>* mem);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#ac58fac80aa13e098a0e9e6c72c5179ca">  219</a></span>&#160;<span class="keyword">typedef</span> <span class="keywordtype">void</span>* (*b2AllocFunction)(int32 size, <span class="keywordtype">void</span>* callbackData);</div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="b2_settings_8h.html#a7c4c0e67a45d8e9b1feb096973195c2c">  221</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="b2_settings_8h.html#a7c4c0e67a45d8e9b1feb096973195c2c">b2FreeFunction</a>)(<span class="keywordtype">void</span>* mem, <span class="keywordtype">void</span>* callbackData);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="keywordtype">void</span> <a class="code" href="b2_settings_8h.html#a9e1c46d4c0c37382656bfb2c79e4508a">b2SetAllocFreeCallbacks</a>(<a class="code" href="b2_settings_8h.html#ac58fac80aa13e098a0e9e6c72c5179ca">b2AllocFunction</a> allocCallback,</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                             <a class="code" href="b2_settings_8h.html#a7c4c0e67a45d8e9b1feb096973195c2c">b2FreeFunction</a> freeCallback,</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                             <span class="keywordtype">void</span>* callbackData);</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="keywordtype">void</span> <a class="code" href="b2_settings_8h.html#a0cd45e29c4e5b126cf16b8d88c24a00e">b2SetNumAllocs</a>(<span class="keyword">const</span> int32 numAllocs);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;int32 <a class="code" href="b2_settings_8h.html#a60375fb093d9f8f71f2d98f9129f9858">b2GetNumAllocs</a>();</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;<span class="keywordtype">void</span> <a class="code" href="b2_settings_8h.html#a9f10095d05c74eebfe535931c9061ab2">b2Log</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span>, ...);</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="structb2_version.html">  244</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structb2_version.html">b2Version</a></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;{</div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="structb2_version.html#a720da8e346364d1cb34d176125380b44">  246</a></span>&#160;    int32 <a class="code" href="structb2_version.html#a720da8e346364d1cb34d176125380b44">major</a>;        </div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="structb2_version.html#a115b8797a6e0b8e53f54502bd20d89da">  247</a></span>&#160;    int32 <a class="code" href="structb2_version.html#a115b8797a6e0b8e53f54502bd20d89da">minor</a>;        </div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="structb2_version.html#a395cfe1434e348115d2ead3d72b88847">  248</a></span>&#160;    int32 <a class="code" href="structb2_version.html#a395cfe1434e348115d2ead3d72b88847">revision</a>;     </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;};</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="keyword">extern</span> <a class="code" href="structb2_version.html">b2Version</a> <a class="code" href="b2_settings_8h.html#a3a20e3b6a8b05633d911fea031f7a44f">b2_version</a>;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structb2_version.html">b2Version</a> <a class="code" href="b2_settings_8h.html#a6d36337c300b30f6f78b9d92ab78ec76">b2_liquidFunVersion</a>;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="b2_settings_8h.html#ad2d708404cc84acb7e8f65de9738a9a5">b2_liquidFunVersionString</a>;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="b2_settings_8h_html_a9f10095d05c74eebfe535931c9061ab2"><div class="ttname"><a href="b2_settings_8h.html#a9f10095d05c74eebfe535931c9061ab2">b2Log</a></div><div class="ttdeci">void b2Log(const char *string,...)</div><div class="ttdoc">Logging function. </div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:116</div></div>
<div class="ttc" id="b2_settings_8h_html_a7c4c0e67a45d8e9b1feb096973195c2c"><div class="ttname"><a href="b2_settings_8h.html#a7c4c0e67a45d8e9b1feb096973195c2c">b2FreeFunction</a></div><div class="ttdeci">void(* b2FreeFunction)(void *mem, void *callbackData)</div><div class="ttdoc">Use this function to override b2Free() without recompiling this library. </div><div class="ttdef"><b>Definition:</b> b2Settings.h:221</div></div>
<div class="ttc" id="structb2_version_html_a115b8797a6e0b8e53f54502bd20d89da"><div class="ttname"><a href="structb2_version.html#a115b8797a6e0b8e53f54502bd20d89da">b2Version::minor</a></div><div class="ttdeci">int32 minor</div><div class="ttdoc">incremental changes </div><div class="ttdef"><b>Definition:</b> b2Settings.h:247</div></div>
<div class="ttc" id="b2_settings_8h_html_a50f4abf5edeabd0300946edbd542e24d"><div class="ttname"><a href="b2_settings_8h.html#a50f4abf5edeabd0300946edbd542e24d">b2Free</a></div><div class="ttdeci">void b2Free(void *mem)</div><div class="ttdoc">If you implement b2Alloc, you should also implement this function. </div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:99</div></div>
<div class="ttc" id="b2_settings_8h_html_a2dca9b286e9b9d6d022055fd61534bd7"><div class="ttname"><a href="b2_settings_8h.html#a2dca9b286e9b9d6d022055fd61534bd7">b2Alloc</a></div><div class="ttdeci">void * b2Alloc(int32 size)</div><div class="ttdoc">Implement this function to use your own memory allocator. </div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:93</div></div>
<div class="ttc" id="b2_settings_8h_html_ac58fac80aa13e098a0e9e6c72c5179ca"><div class="ttname"><a href="b2_settings_8h.html#ac58fac80aa13e098a0e9e6c72c5179ca">b2AllocFunction</a></div><div class="ttdeci">void *(* b2AllocFunction)(int32 size, void *callbackData)</div><div class="ttdoc">Use this function to override b2Alloc() without recompiling this library. </div><div class="ttdef"><b>Definition:</b> b2Settings.h:219</div></div>
<div class="ttc" id="b2_settings_8h_html_a3a20e3b6a8b05633d911fea031f7a44f"><div class="ttname"><a href="b2_settings_8h.html#a3a20e3b6a8b05633d911fea031f7a44f">b2_version</a></div><div class="ttdeci">b2Version b2_version</div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:25</div></div>
<div class="ttc" id="structb2_version_html"><div class="ttname"><a href="structb2_version.html">b2Version</a></div><div class="ttdef"><b>Definition:</b> b2Settings.h:244</div></div>
<div class="ttc" id="b2_settings_8h_html_ad2d708404cc84acb7e8f65de9738a9a5"><div class="ttname"><a href="b2_settings_8h.html#ad2d708404cc84acb7e8f65de9738a9a5">b2_liquidFunVersionString</a></div><div class="ttdeci">const char * b2_liquidFunVersionString</div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:41</div></div>
<div class="ttc" id="structb2_version_html_a720da8e346364d1cb34d176125380b44"><div class="ttname"><a href="structb2_version.html#a720da8e346364d1cb34d176125380b44">b2Version::major</a></div><div class="ttdeci">int32 major</div><div class="ttdoc">significant changes </div><div class="ttdef"><b>Definition:</b> b2Settings.h:246</div></div>
<div class="ttc" id="b2_settings_8h_html_a60375fb093d9f8f71f2d98f9129f9858"><div class="ttname"><a href="b2_settings_8h.html#a60375fb093d9f8f71f2d98f9129f9858">b2GetNumAllocs</a></div><div class="ttdeci">int32 b2GetNumAllocs()</div><div class="ttdoc">Get number of calls to b2Alloc minus number of calls to b2Free. </div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:110</div></div>
<div class="ttc" id="b2_settings_8h_html_a6d36337c300b30f6f78b9d92ab78ec76"><div class="ttname"><a href="b2_settings_8h.html#a6d36337c300b30f6f78b9d92ab78ec76">b2_liquidFunVersion</a></div><div class="ttdeci">const b2Version b2_liquidFunVersion</div><div class="ttdoc">Global variable is used to identify the version of LiquidFun. </div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:36</div></div>
<div class="ttc" id="b2_settings_8h_html_a0cd45e29c4e5b126cf16b8d88c24a00e"><div class="ttname"><a href="b2_settings_8h.html#a0cd45e29c4e5b126cf16b8d88c24a00e">b2SetNumAllocs</a></div><div class="ttdeci">void b2SetNumAllocs(const int32 numAllocs)</div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:105</div></div>
<div class="ttc" id="b2_settings_8h_html_a9e1c46d4c0c37382656bfb2c79e4508a"><div class="ttname"><a href="b2_settings_8h.html#a9e1c46d4c0c37382656bfb2c79e4508a">b2SetAllocFreeCallbacks</a></div><div class="ttdeci">void b2SetAllocFreeCallbacks(b2AllocFunction allocCallback, b2FreeFunction freeCallback, void *callbackData)</div><div class="ttdef"><b>Definition:</b> b2Settings.cpp:72</div></div>
<div class="ttc" id="structb2_version_html_a395cfe1434e348115d2ead3d72b88847"><div class="ttname"><a href="structb2_version.html#a395cfe1434e348115d2ead3d72b88847">b2Version::revision</a></div><div class="ttdeci">int32 revision</div><div class="ttdoc">bug fixes </div><div class="ttdef"><b>Definition:</b> b2Settings.h:248</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
